package com.vone.vmq;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Author: zhangbo
 * Data：2019/11/7
 * TODO:
 */
public class BaseResult implements Parcelable {


    private int code;
    private String message;
    private String data;

    public int getCode() {
        return code;
    }

    public BaseResult setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public BaseResult setMessage(String message) {
        this.message = message;
        return this;
    }

    public String getData() {
        return data;
    }

    public BaseResult setData(String data) {
        this.data = data;
        return this;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.code);
        dest.writeString(this.message);
        dest.writeString(this.data);
    }

    public BaseResult() {
    }

    protected BaseResult(Parcel in) {
        this.code = in.readInt();
        this.message = in.readString();
        this.data = in.readString();
    }

    public static final Parcelable.Creator<BaseResult> CREATOR = new Parcelable.Creator<BaseResult>() {
        @Override
        public BaseResult createFromParcel(Parcel source) {
            return new BaseResult(source);
        }

        @Override
        public BaseResult[] newArray(int size) {
            return new BaseResult[size];
        }
    };
}
